import * as req from '@/request';


export async function all() {
  return req.postForm<API.CdnAccountList>('/cdndomain/all');
}

export async function list(
  params: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.CdnAccountList>('/cdndomain/list',params,sorter,filter,);
}

export async function add(data: { [key: string]: any }) {
  return req.postJson<API.Result>('/cdndomain/create', data);
}

export async function update(data: { [key: string]: any }) {
  return req.postJson<API.Result>('/cdndomain/update', data);
}

export async function remove(data: { key: string }) {
  return req.post<API.Result>('/cdndomain/delete', data);
}


export async function cdnDomainAll() {
  return req.postForm<API.CdnDomainList>('/cdndomain/cdnDomainAll');
}

export async function cdnDomainList(
  params: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.CdnDomainList>('/cdndomain/cdndomainList',params,sorter,filter,);
}

export async function cdnDomainAdd(data: { [key: string]: any }) {
  return req.postJson<API.Result>('/cdndomain/cdndomaincreate', data);
}

export async function cdnDomainUpdate(data: { [key: string]: any }) {
  return req.postJson<API.Result>('/cdndomain/cdndomainupdate', data);
}

export async function cdnDomainRemove(data: { key: string }) {
  return req.post<API.Result>('/cdndomain/cdndomaindelete', data);
}


export async function cdnDomainDnslist(
  params: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.CdnDomainDnsList>('/cdndomain/cdnDomainDnslist',params,sorter,filter,);
}

export async function cdnDomainDnsAdd(data: { [key: string]: any }) {
  return req.postJson<API.Result>('/cdndomain/cdnDomainDnscreate', data);
}

export async function cdnDomainDnsUpdate(data: { [key: string]: any }) {
  return req.postJson<API.Result>('/cdndomain/cdnDomainDnsupdate', data);
}

export async function cdnDomainDnsRemove(data: { key: string }) {
  return req.post<API.Result>('/cdndomain/cdnDomainDnsdelete', data);
}



